package com.erhirent.view;

import java.util.List;

import com.erhirent.bean.Car;

public class UserqueryAll extends View {

	@Override
	public View showView() {
		// 查看所有汽车
		List<Car> list = mcar.userquery();
		if (list.size() != 0) {
			System.out.println("----------------------------");
			System.out.println("汽车编号\t" + "汽车名称\t" + "备注\t" + "品牌\t" + "类型\t" + "单价\t" + "是否可租");
			for (Car car : list) {
				System.out.print(car.getcarId() + "\t");
				System.out.print(car.getcarName() + "\t");
				System.out.print(car.getcarRemark() + "\t");
				System.out.print(car.getbrandName() + "\t");
				System.out.print(car.gettypeName() + "\t");
				System.out.print(car.getcarPrice() + "/天\t");
				System.out.println(car.getcarIsrent() + "\t");
			}
			System.out.println("----------------------------");
		} else {
			System.out.println("查询失败");
		}

		return mView;
	}

}
